#include "ATD.h"
#include "Sqlist.h"
int main()
{
	SqList L;
	InitList_Sq(L);
	printf("L.length = %d\nL.listsize = %d\n", ListLength_Sq(L),L.listsize);
	if(ListEmpty_Sq(L))
		printf("List is empty.\n");
	else
		printf("List is'nt empty.\n");
	ElemType e,a,b;
	for (int i = 1; i < 101; ++i)
	{
		ListInsert_Sq(L,i,i);
	}
	printf("ListLength = %d\n", ListLength_Sq(L));
	ListInsert_Sq(L,50,101);
	printf("ListLength = %d\n", ListLength_Sq(L));
	printf("the 50th elem = %d\n", L.elem[49]);
	
	PriorElem_Sq(L,22,a);
	NextElem_Sq(L,32,b);
	printf("a = %d,b = %d\n", a,b);
	return 0;
}